<template>

<hi>这是一个登录页</hi>
<p>默认账号:abc， 默认密码:123</p>
    <div>
    账号：<input type="text" v-model="account" placeholder="请输入你的账号">
    </div>
    <div>
    密码：<input type="password" v-model="password" placeholder="请输入你的密码">
    </div>
    <button @click="login"> 登录</button>
  
</template>


<script>
export default{
    data(){
        return{
            account :'',
            password:'',
        }
    },
    methods:{
        login(){
            if(this.account ==='abc'&& this.password ==='123'){
                alert("登录成功")
            }else{
                alert("账号或密码错误，请重新输入")
                // this.account = ''
                this.password = ''
            }
            
        }
    }
    
    }
</script>